﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataImport.aspx.cs" Inherits="Web.DataImport" EnableViewState="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>管理用户</title>
    <link href="css/minicss.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
</head>
<body>
<div id="block">
<div id='blocktitle'>数据导入</div>
<div id='blockcontent'>
<input type="button" value="开始导入" id="GoBut" />
</div>
</div>
<script type="text/javascript">
    $("#GoBut").click(function() {
        $("#GoBut").attr("disabled", true);
        $.ajax({
            type: "POST",
            url: "DataImport.aspx/ImportQuestion",
            data: '{}',
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            success: function(result) {
                if (result.d == "err") {
                    alert("导入失败");
                }
                else {
                    alert("成功导入" + result.d + "条数据");
                }
                $("#GoBut").attr("disabled", false);
            }
        });
    });

</script>
</body>
</html>
